<h2 class="divider<% if (model.IsComplete()) { %> completed<% } %>">
  Sprint <%= model.get('iteration') %> stories
</h2>

<div class="all-stories">
  <div class="stories-container">
    <div class="cards story-droppable"></div>
    <div class="totals"></div>
    <% if (model.IsEditable()) { %>
      <div class="complete-status">
        <% if (model.IsComplete()) { %>
          <a href="#incomplete" class="mark-sprint-as-incomplete button greyed">Mark sprint as incomplete</a>
        <% } else { %>
          <a href="#complete" class="mark-sprint-as-complete button">Mark sprint as complete</a>
          <% if (model.SprintStories().incompleteStories().length) { %>
          <a href="#move-stories" class="bulk-move-stories">move all incomplete stories</a>
          <% } %>
        <% } %>
      </div>
    <% } %>
  </div>
  <div class="unassigned-stories-heading">Backlog (unassigned stories)</div>
  <div class="stories-divider">
    <div class="handle"><div class="change-size">expand</div></div>
  </div>
  <div class="unassigned-stories-container story-droppable">
    <% if (model.IsLocked()) { %>
      <div class="notice locked">
        You cannot assign any stories to this sprint as the backlog is locked
      </div>
    <% } else if (!model.CanEdit()) { %>
      <div class="notice locked">
        You cannot assign any stories to sprints as you don't have permission
      </div>
    <% } else if (model.IsComplete()) { %>
      <div class="read-only locked">
        You cannot move any stories into a completed sprint
      </div>
    <% } %>
  </div>
</div>